/*
可选参数
默认参数
剩余参数
*/
(() => {
    function buildName(firstName = 'A', lastName) {
        if (lastName) {
            return firstName + '-' + lastName;
        }
        else {
            return firstName;
        }
    }
    console.log(buildName('C', 'D'));
    console.log(buildName('C'));
    console.log(buildName());
    function info(x, ...args) {
        console.log(x, args);
    }
    info('abc', 1, 2, 3);
})();
